package com.jair.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.jair.web.service.IndexService;

@Controller
public class IndexController {
    @Autowired
    private IndexService indexService;

    @RequestMapping(value = "index", method = RequestMethod.GET)
    private ModelAndView index() {
        ModelAndView modelAndView = new ModelAndView("index");

        //查询大广告位数据
        modelAndView.addObject("indexAd1", this.indexService.getIndexAd1());
        return modelAndView;
    }

}
